package graphAndAnswer;

import interfaces.BuildGraph;
import graph.GenericGraph;

public class GoolkateGraph implements BuildGraph {

	@Override
	public GenericGraph getGraph() {
		GenericGraph graph = new GenericGraph();
		addNodes(graph);
		addRoads(graph);
		return graph;
	}

	@Override
	public void addNodes(GenericGraph graph) {
		graph.addNode("A");
		graph.addNode("B");
		graph.addNode("C");
		graph.addNode("D");
		graph.addNode("E");
		graph.addNode("F");
		graph.addNode("G");
		graph.addNode("H");
		graph.addNode("I");
		graph.addNode("J");
		graph.addNode("K");

	}

	@Override
	public void addRoads(GenericGraph graph) {
		graph.addEdge("A", "B", 0);
		graph.addEdge("A", "C", 0);
		graph.addEdge("B", "D", 1);
		graph.addEdge("B", "E", 2);
		graph.addEdge("C", "F", 1);
		graph.addEdge("D", "G", 10);
		graph.addEdge("E", "G", 1);
		graph.addEdge("E", "H", 2);
		graph.addEdge("F", "H", 4);
		graph.addEdge("F", "K", 1);
		graph.addEdge("G", "I", 1);
		graph.addEdge("G", "J", 1);
		graph.addEdge("H", "I", 4);
		graph.addEdge("I", "J", 1);
		graph.addEdge("J", "K", 1);
	}

}
